# import json
# info={'name':'张三','age':18,'isMan':True,'like':['11','22']}
# with open("inf2.json","w",encoding='utf-8')as f:
#     json.dump(info,f,ensure_ascii=False,indent=2)
# from s2 import add
# class TestAdd:
#     def test_add_1(self):
#         print('0，10,10')
#         assert 10==add(0,10)
#     def test_add_2(self):
#         print('5，1,6')
#         assert 6 == add(5, 1)
#     def test_add_3(self):
#         print('9,7,16')
#         assert 17==add(9,7)
import json
import pytest
from config import Base_DIR
from s2 import add
def data():
    with open(Base_DIR+"base\\add.json",encoding='utf-8') as f:
        list=json.load(f)
        return list


class TestAdd2:
    @pytest.mark.parametrize('a,b,excpet', data())
    def test_add_1(self,a,b,excpet):
        print(f'{a},{b},{excpet}')
        assert excpet==add(a,b)